
<!DOCTYPE HTML>
<html lang="cn" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>代码规范 · 前端学习笔记</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        <meta name="author" content="chengdaohua">
        
        
    
    <link rel="stylesheet" href="../../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-anchors/plugin.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-toggle-chapters/toggle.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-expandable-chapters/expandable-chapters.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-splitter/splitter.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-advanced-emoji/emoji-website.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-tbfed-pagefooter/footer.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="../js/jsReadme.html" />
    
    
    <link rel="prev" href="chushihua.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="Type to search" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    
    
        
        <li>
            <a href="https://chengdaohua.gitee.io/remarkbook/" target="_blank" class="custom-link">Home</a>
        </li>
    
    

    
    <li class="divider"></li>
    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../../">
            
                <a href="../../">
            
                    
                    介绍
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="./">
            
                <a href="./">
            
                    
                    vue 学习
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1" data-path="start.html">
            
                <a href="start.html">
            
                    
                    原理
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.2" data-path="mokuaihua.html">
            
                <a href="mokuaihua.html">
            
                    
                    模块化和组件化开发
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.3" data-path="huakucha.html">
            
                <a href="huakucha.html">
            
                    
                    花裤衩项目
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.4" data-path="chushihua.html">
            
                <a href="chushihua.html">
            
                    
                    项目初始化
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="1.2.5" data-path="guifan.html">
            
                <a href="guifan.html">
            
                    
                    代码规范
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="../js/jsReadme.html">
            
                <a href="../js/jsReadme.html">
            
                    
                    javaScript
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1" data-path="../js/array.html">
            
                <a href="../js/array.html">
            
                    
                    数组
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2" data-path="../js/object.html">
            
                <a href="../js/object.html">
            
                    
                    对象
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.3" data-path="../js/function.html">
            
                <a href="../js/function.html">
            
                    
                    函数
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.4" data-path="../js/string.html">
            
                <a href="../js/string.html">
            
                    
                    字符串
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="../review/project.html">
            
                <a href="../review/project.html">
            
                    
                    review
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1" data-path="../review/CodeReview.html">
            
                <a href="../review/CodeReview.html">
            
                    
                    CoderReview
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="../node/简介.html">
            
                <a href="../node/简介.html">
            
                    
                    node
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.1" data-path="../node/简介.html">
            
                <a href="../node/简介.html">
            
                    
                    简介
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2" data-path="../node/express.html">
            
                <a href="../node/express.html">
            
                    
                    express
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="../ts/ts.html">
            
                <a href="../ts/ts.html">
            
                    
                    ts
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7" data-path="../websocket/websocket.html">
            
                <a href="../websocket/websocket.html">
            
                    
                    websocket
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8" data-path="../webpack/webpack.html">
            
                <a href="../webpack/webpack.html">
            
                    
                    webpack
            
                </a>
            

            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="../.." >代码规范</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h3 id="&#x9879;&#x76EE;&#x4EE3;&#x7801;&#x89C4;&#x8303;"><a name="&#x9879;&#x76EE;&#x4EE3;&#x7801;&#x89C4;&#x8303;" class="plugin-anchor" href="#&#x9879;&#x76EE;&#x4EE3;&#x7801;&#x89C4;&#x8303;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x9879;&#x76EE;&#x4EE3;&#x7801;&#x89C4;&#x8303;</h3>
<p><img src="https://timgsa.baidu.com/timg?image&amp;quality=80&amp;size=b9999_10000&amp;sec=1577779791880&amp;di=296a1d82149d6a4ea895ac68283d0972&amp;imgtype=0&amp;src=http%3A%2F%2Fwww.itcast.cn%2Ffiles%2Fimage%2F201904%2F20190415154446003.png" alt=""></p>
<h5 id="&#x82B1;&#x88E4;&#x8869;&#x547D;&#x540D;&#x89C4;&#x8303;"><a name="&#x82B1;&#x88E4;&#x8869;&#x547D;&#x540D;&#x89C4;&#x8303;" class="plugin-anchor" href="#&#x82B1;&#x88E4;&#x8869;&#x547D;&#x540D;&#x89C4;&#x8303;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x82B1;&#x88E4;&#x8869;&#x547D;&#x540D;&#x89C4;&#x8303;</h5>
<p>&#x5176;&#x5B9E;&#x521A;&#x5F00;&#x59CB;&#x6211;&#x5199; vue &#x6587;&#x4EF6;&#x7684;&#x65F6;&#x5019;&#x4E5F;&#x4E0D;&#x6CE8;&#x610F;&#xFF0C;&#x5404;&#x79CD;&#x9A7C;&#x5CF0;&#x554A;&#x3001;&#x5927;&#x5199;&#x5F00;&#x5934; (PascalCase)&#x8FD8;&#x662F;&#x6A2A;&#x7EBF;&#x8FDE;&#x63A5; (kebab-case)&#x6DF7;&#x7740;&#x6765;&#xFF0C;&#x8C01;&#x53EB; vue &#x90FD;&#x53EF;&#x4EE5;&#xFF0C;&#x5728; &#x98CE;&#x683C;&#x6307;&#x5357; &#x4E2D;&#x4E5F;&#x6CA1;&#x6709;&#x5B9A;&#x8BBA;&#x3002;&#x4E0D;&#x8FC7;&#x57FA;&#x4E8E;&#x672C;&#x9879;&#x76EE;&#x6211;&#x8FD8;&#x662F;&#x6574;&#x7406;&#x4E86;&#x4E00;&#x5957;&#x6587;&#x4EF6;&#x7684;&#x547D;&#x540D;&#x89C4;&#x5219;&#x3002;
Component
&#x6240;&#x6709;&#x7684; Component &#x6587;&#x4EF6;&#x90FD;&#x662F;&#x4EE5;&#x5927;&#x5199;&#x5F00;&#x5934; (PascalCase)&#xFF0C;&#x8FD9;&#x4E5F;&#x662F;&#x5B98;&#x65B9;&#x6240; &#x63A8;&#x8350;&#x7684;&#x3002;
&#x4F46;&#x9664;&#x4E86; index.vue&#x3002;
&#x4F8B;&#x5B50;&#xFF1A;</p>
<pre><code>@/src/components/BackToTop/index.vue
@/src/components/Charts/Line.vue
@/src/views/example/components/Button.vue
</code></pre><p>JS &#x6587;&#x4EF6;
&#x6240;&#x6709;&#x7684;.js &#x6587;&#x4EF6;&#x90FD;&#x9075;&#x5FAA;&#x6A2A;&#x7EBF;&#x8FDE;&#x63A5; (kebab-case)&#x3002;
&#x4F8B;&#x5B50;&#xFF1A;</p>
<pre><code>@/src/utils/open-window.js
@/src/views/svg-icons/require-icons.js
@/src/components/MarkdownEditor/default-options.js
</code></pre><p>Views
&#x5728; views &#x6587;&#x4EF6;&#x4E0B;&#xFF0C;&#x4EE3;&#x8868;&#x8DEF;&#x7531;&#x7684;.vue &#x6587;&#x4EF6;&#x90FD;&#x4F7F;&#x7528;&#x6A2A;&#x7EBF;&#x8FDE;&#x63A5; (kebab-case)&#xFF0C;&#x4EE3;&#x8868;&#x8DEF;&#x7531;&#x7684;&#x6587;&#x4EF6;&#x5939;&#x4E5F;&#x662F;&#x4F7F;&#x7528;&#x540C;&#x6837;&#x7684;&#x89C4;&#x5219;&#x3002;
&#x4F8B;&#x5B50;&#xFF1A;</p>
<pre><code>@/src/views/svg-icons/index.vue
@/src/views/svg-icons/require-icons.js
</code></pre><p>&#x4F7F;&#x7528;&#x6A2A;&#x7EBF;&#x8FDE;&#x63A5; (kebab-case)&#x6765;&#x547D;&#x540D; views &#x4E3B;&#x8981;&#x662F;&#x51FA;&#x4E8E;&#x4EE5;&#x4E0B;&#x51E0;&#x4E2A;&#x8003;&#x8651;&#x3002;</p>
<p>&#x6A2A;&#x7EBF;&#x8FDE;&#x63A5; (kebab-case) &#x4E5F;&#x662F;&#x5B98;&#x65B9;&#x63A8;&#x8350;&#x7684;&#x547D;&#x540D;&#x89C4;&#x8303;&#x4E4B;&#x4E00; &#x6587;&#x6863;
views &#x4E0B;&#x7684;.vue &#x6587;&#x4EF6;&#x4EE3;&#x8868;&#x7684;&#x662F;&#x4E00;&#x4E2A;&#x8DEF;&#x7531;&#xFF0C;&#x6240;&#x4EE5;&#x5B83;&#x9700;&#x8981;&#x548C; component &#x8FDB;&#x884C;&#x533A;&#x5206;(component &#x90FD;&#x662F;&#x5927;&#x5199;&#x5F00;&#x5934;)
&#x9875;&#x9762;&#x7684; url &#x4E5F;&#x90FD;&#x662F;&#x6A2A;&#x7EBF;&#x8FDE;&#x63A5;&#x7684;&#xFF0C;&#x6BD4;&#x5982;<a href="https://www.xxx.admin/export-excel&#xFF0C;&#x6240;&#x4EE5;&#x8DEF;&#x7531;&#x5BF9;&#x5E94;&#x7684;view&#x5E94;&#x8BE5;&#x8981;&#x4FDD;&#x6301;&#x7EDF;&#x4E00;" target="_blank">https://www.xxx.admin/export-excel&#xFF0C;&#x6240;&#x4EE5;&#x8DEF;&#x7531;&#x5BF9;&#x5E94;&#x7684;view&#x5E94;&#x8BE5;&#x8981;&#x4FDD;&#x6301;&#x7EDF;&#x4E00;</a>
&#x6CA1;&#x6709;&#x5927;&#x5C0F;&#x5199;&#x654F;&#x611F;&#x95EE;&#x9898;</p>
<h5 id="javascript-&#x89C4;&#x8303;"><a name="javascript-&#x89C4;&#x8303;" class="plugin-anchor" href="#javascript-&#x89C4;&#x8303;"><i class="fa fa-link" aria-hidden="true"></i></a>javascript &#x89C4;&#x8303;</h5>
<p><a href="http://www.xuanfengge.com/fedoc/" target="_blank">&#x524D;&#x7AEF; javascript &#x89C4;&#x8303;&#x6587;&#x6863;</a> <br>
<a href="https://www.jianshu.com/p/c8c833bb5ae5" target="_blank">&#x524D;&#x7AEF;&#x5F00;&#x53D1;&#x89C4;&#x8303;&#xFF1A;JS &#x89C4;&#x8303;</a> <br></p>
<h5 id="restful-api-&#x89C4;&#x8303;"><a name="restful-api-&#x89C4;&#x8303;" class="plugin-anchor" href="#restful-api-&#x89C4;&#x8303;"><i class="fa fa-link" aria-hidden="true"></i></a>RESTful API &#x89C4;&#x8303;</h5>
<p><a href="https://juejin.im/post/57d168e9bf22ec005f98a3a5" target="_blank">RESTful API &#x7F16;&#x5199;&#x6307;&#x5357;</a> <br></p>
<h5 id="vue-&#x89C4;&#x8303;"><a name="vue-&#x89C4;&#x8303;" class="plugin-anchor" href="#vue-&#x89C4;&#x8303;"><i class="fa fa-link" aria-hidden="true"></i></a>VUE &#x89C4;&#x8303;</h5>
<p><a href="https://cn.vuejs.org/v2/style-guide/index.html" target="_blank">vue &#x5B98;&#x65B9;&#x98CE;&#x683C;&#x6307;&#x5357;</a> <br></p>
<footer class="page-footer"><span class="copyright">Copyright &#xA9; wml 2019 all right reserved&#xFF0C;powered by Gitbook</span><span class="footer-modification">&#x8BE5;&#x6587;&#x4EF6;&#x4FEE;&#x8BA2;&#x65F6;&#x95F4;&#xFF1A;
2019-12-31 13:28:10
</span></footer>
                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="chushihua.html" class="navigation navigation-prev " aria-label="Previous page: 项目初始化">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="../js/jsReadme.html" class="navigation navigation-next " aria-label="Next page: javaScript">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"代码规范","level":"1.2.5","depth":2,"next":{"title":"javaScript","level":"1.3","depth":1,"path":"category/js/jsReadme.md","ref":"category/js/jsReadme.md","articles":[{"title":"数组","level":"1.3.1","depth":2,"path":"category/js/array.md","ref":"category/js/array.md","articles":[]},{"title":"对象","level":"1.3.2","depth":2,"path":"category/js/object.md","ref":"category/js/object.md","articles":[]},{"title":"函数","level":"1.3.3","depth":2,"path":"category/js/function.md","ref":"category/js/function.md","articles":[]},{"title":"字符串","level":"1.3.4","depth":2,"path":"category/js/string.md","ref":"category/js/string.md","articles":[]}]},"previous":{"title":"项目初始化","level":"1.2.4","depth":2,"path":"category/vue/chushihua.md","ref":"category/vue/chushihua.md","articles":[]},"dir":"ltr"},"config":{"plugins":["-lunr","anchors","sitemap-general","toggle-chapters","expandable-chapters","splitter","edit-link","advanced-emoji","tbfed-pagefooter"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"tbfed-pagefooter":{"copyright":"Copyright &copy wml 2019","modify_label":"该文件修订时间：","modify_format":"YYYY-MM-DD HH:mm:ss"},"github":{"url":"https://gitee.com/chengdaohua/remarkBook"},"simple-page-toc":{"maxDepth":3,"skipFirstH1":false},"splitter":{},"search-pro":{"cutWordLib":"nodejieba","defineWord":["gitbook-use"]},"search":{},"donate":{"wechat":"","alipay":"","title":"","button":"赏","alipayText":"支付宝打赏","wechatText":"微信打赏"},"sitemap-general":{"prefix":"https://chengdaohua.gitee.io/remarkbook/"},"changyan":{"appid":"cytowLiqM","conf":"the conf in the code generate by changyan"},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"sitemap":{"hostname":"https://wmlhub.gitee.io/gitbook/"},"baidu":{"token":"084b900a1e26f6bae60e09d18e3aa455"},"advanced-emoji":{"embedEmojis":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":true,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"edit-link":{"label":"Edit This Page","base":"https://gitee.com/chengdaohua/remarkBook"},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"anchors":{},"toggle-chapters":{},"expandable-chapters":{}},"theme":"default","author":"chengdaohua","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"前端学习笔记","language":"cn","links":{"sidebar":{"Home":"https://chengdaohua.gitee.io/remarkbook/"}},"gitbook":"3.2.3","description":"记录日常学习总结"},"file":{"path":"category/vue/guifan.md","mtime":"2019-12-31T05:28:10.877Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2020-05-22T06:18:21.707Z"},"basePath":"../..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../../gitbook/gitbook.js"></script>
    <script src="../../gitbook/theme.js"></script>
    
        
        <script src="../../gitbook/gitbook-plugin-toggle-chapters/toggle.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-expandable-chapters/expandable-chapters.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-splitter/splitter.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-edit-link/plugin.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

